package senior.ListExer.Exer3;

import java.util.HashSet;
import java.util.Set;

/**
 * @author shkstart
 * @creat 2022-04-11:34
 */
public class SetTest1 {
    public static void main(String[] args) {
        Set set = new HashSet();
        set.add(new Person("111","tom",23));
        set.add(new Person("112","tom",23));
        set.add(new Person("120","tom",23));
        set.add(new Person("114","tom",23));
        set.add(new Person("113","tom",23));
        set.add(new Person("111","tom",23));
        set.add(new Person("108","tom",23));
        set.add(new Person("102","tom",23));
        int size = set.size();
        System.out.println("列表有" + size + "个数据");
        for(Object o:set){
            Person p = (Person)o;
            System.out.println(o);
        }

    }
}
